#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>

int main()
{
  umask(0);
  int fd = open("bite", O_RDWR|O_CREAT, 0666);

  char* str = "I like Linux!\n";

  ssize_t ret = write(fd, str, strlen(str));

  lseek(fd, 0, SEEK_SET);

  char buf[50] = {0};
  read(fd, buf, 50);

  printf("%s", buf);
  
  return 0;
  

}
